<template>
  <el-container>
    <component :is="currentComponent" :elementId="elementId"  :perms="perms" :labelName="labelName"
               :updateLhsxbFlag="updateLhsxbFlag"
               :updateHjxwbFlag="updateHjxwbFlag"
               :updateStwhbFlag="updateStwhbFlag"
               :updateJkwhbFlag="updateJkwhbFlag"
               :updateHyxxbFlag="updateHyxxbFlag"
               :btName="btName"
               :showdata="showdata"></component>
    <!--    <Lhsxb :elementId="elementId" :perms="perms"  :labelName="labelName" :Flag="addRecordLhsxbFlag" />-->
    <!--    <Hjxwb :elementId="elementId" :perms="perms"  :labelName="labelName"  />-->
    <!--    <Stwhb :elementId="elementId" :perms="perms" :labelName="labelName" />-->
    <!--    <Jkwhb :elementId="elementId" :perms="perms"  :labelName="labelName"  />-->
    <!--    <Hyxxb :elementId="elementId" :perms="perms"  :labelName="labelName" />-->
  </el-container>
</template>

<script>

  import Lhsxb from "./AddRecordEleAttr/Lhsxb";
  import Hjxwb from "./AddRecordEleAttr/Hjxwb";
  import Stwhb from "./AddRecordEleAttr/Stwhb";
  import Jkwhb from "./AddRecordEleAttr/Jkwhb";
  import Hyxxb from "./AddRecordEleAttr/Hyxxb";
  export default {
    name: "UpdateAndCorrect",
    components: {Hyxxb, Jkwhb, Stwhb, Hjxwb, Lhsxb},
    props: {
      elementId: {
        type: String,
        default: ''
      },
      perms: '',
      updateLhsxbFlag: false,
      updateHjxwbFlag: false,
      updateStwhbFlag: false,
      updateJkwhbFlag: false,
      updateHyxxbFlag: false,
      labelName:'',
      btName:'',
      showdata:{}
    },
    data() {
      return {}
    },
    mounted(){
      console.log(
        this.updateLhsxbFlag,
        this.updateHjxwbFlag,
        this.updateStwhbFlag,
        this.updateJkwhbFlag,
        this.updateHyxxbFlag,
        this.btName)
      console.log(this.showdata)
    },
    computed:{
      currentComponent:function () {
        if(this.updateLhsxbFlag === true){
          return Lhsxb
        }else if(this.updateHjxwbFlag === true){
          return Hjxwb
        }else if(this.updateStwhbFlag === true){
          return Stwhb
        }else if(this.updateJkwhbFlag === true){
          return Jkwhb
        }else if(this.updateHyxxbFlag === true){
          return Hyxxb
        }
      }
    }


  }

</script>

<style scoped>

</style>
